//
//  GalleryTableViewCell.m
//  Drops
//
//  Created by dllo on 16/5/21.
//  Copyright © 2016年 Drops.er. All rights reserved.
//

#import "GalleryTableViewCell.h"
#import "SDImageCache.h"
#define WIDTH self.contentView.frame.size.width
@implementation GalleryTableViewCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.imageViewCover = [[UIImageView alloc]init];
        [self.contentView addSubview:self.imageViewCover];
        self.imageViewCover.backgroundColor = [UIColor grayColor];
        
        self.puView = [[UIView alloc]init];
        [self.contentView addSubview:self.puView];
        self.puView.backgroundColor = [UIColor blackColor];
        self.puView.alpha = 0.2;
        
        self.titleLabel = [[UILabel alloc]init];
        self.titleLabel.textAlignment = 1;
        self.titleLabel.textColor = [UIColor whiteColor];
        self.titleLabel.font = [UIFont systemFontOfSize:20];
        [self.contentView addSubview:self.titleLabel];
        self.titleLabel.backgroundColor = [UIColor clearColor];
        
        self.detailLabel = [[UILabel alloc]init];
        self.detailLabel.textColor = [UIColor whiteColor];
        self.detailLabel.font = [UIFont systemFontOfSize:15];
        self.detailLabel.textAlignment = 1;
        [self.contentView addSubview:self.detailLabel];
        self.detailLabel.backgroundColor = [UIColor clearColor];
    }
    return self;
}
- (void)layoutSubviews{
    [super layoutSubviews];
    self.imageViewCover.frame = CGRectMake(0, 0, WIDTH, 200);
    self.puView.frame = CGRectMake(0, 0, WIDTH, 200);
    self.titleLabel.frame = CGRectMake(0, 90, WIDTH, 40);
    self.detailLabel.frame = CGRectMake(0, 65, WIDTH, 25);
}



- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
